﻿using Shop.Model.DB;
using Shop.Model.Goods;
using Shop.RemoteModel.SpuGoods.Model;
using WeDonekRpc.Model;

namespace Shop.Collect
{
    public interface IGoodsCollect
    {
        long Add ( GoodsSetArg arg );
        void Delete ( DBGoods goods );
        DBGoods Get ( long id );
        Result Get<Result> ( long id ) where Result : class;
        Dictionary<long, string> GetNames ( long[] ids );
        Result[] Gets<Result> ( long[] ids ) where Result : class, new();
        Dictionary<long, GoodsState> GetState ( long[] ids );
        Result[] GetTops<Result> ( TopGetArg arg ) where Result : class, new();
        void OffShelf ( DBGoods goods );
        bool Public ( DBGoods goods, short num, decimal price );
        void PublicComplete ( long id );
        Result[] Query<Result> ( GoodsQuery query, IBasicPage paging, out int count ) where Result : class;
        bool Set ( DBGoods goods, GoodsSetArg arg );
    }
}